<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="keywords" content="">
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1.0, user-scalable=no" />	
		<title>上海林业</title>
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/font-awesome.css" />
		<link rel="stylesheet" href="css/public.css" />
	</head>
	<body>
		<div class="player">
			<div class="containe player-bd">
				<div class="row margin-none">
					<div class="col-xs-4 col-xs-offset-4 padding-right-none padding-left-none">
						<img src="img/f7.jpg" alt=""  id="headimgurl"/>
					</div>
				</div>
				<div class="row margin-top-7px margin-none">
					<div class="col-xs-5 col-xs-offset-1 padding-right-none padding-left-none">
						<div class="col-xs-6 lei-name-two lei-name padding-right-none padding-left-none">
							<span>姓</span><span>名</span>
						</div>
						<div class="col-xs-6 player-name" id="username">
							某某某某
						</div>
					</div>
					<div class="col-xs-6 padding-right-none  padding-left-none">
						<div class="col-xs-6 lei-name-four lei-name player-city">
							<span>参</span><span>赛</span><span>省</span><span>份</span>
						</div>
						<div class="col-xs-6 player-name" id="province">
							上海市
						</div>
					</div>
				</div>
				<div class="row margin-top-7px margin-none">
					<div class="col-xs-5 col-xs-offset-1 padding-right-none padding-left-none">
						<div class="col-xs-5 lei-name-four lei-name padding-right-none padding-left-none">
							<span>个</span><span>人</span><span>爱</span><span>好</span>
						</div>
					</div>					
				</div>
				<div class="row margin-none margin-top-7px ">
					<div class="col-xs-10 col-xs-offset-1 padding-right-none padding-left-none">
						<div class="play-text" id="hobby">
							足球
						</div>
					</div>
				</div>
				<div class="row margin-top-7px margin-none">
					<div class="col-xs-5 col-xs-offset-1 padding-right-none padding-left-none">
						<div class="col-xs-5 lei-name-four lei-name padding-right-none padding-left-none">
							<span>参</span><span>赛</span><span>宣</span><span>言</span>
						</div>
					</div>					
				</div>
				<div class="row margin-none margin-top-7px ">
					<div class="col-xs-10 col-xs-offset-1 padding-right-none padding-left-none">
						<div class="play-text margin-bottom-10" id="declaration">
							足球
						</div>
					</div>
					<div class="tj-btn row tk-btn-row vote-list-row" style="padding-bottom: 32px;">
				    	<div class="col-xs-6 text-center">
				    		<a href="#" class="photo">分享</a>
				    	</div>
				    	<div class="col-xs-6 text-center">
				    		<a onclick="vote()" href="#" class="tj">投票</a>
				    	</div>
				    </div>
				    <div id="share-wrapper" class="text-right">
						<img src="img/arrow.png" alt="" />
					</div>
				</div>
			</div>
		</div>
		            <div style="display: none;" class="bigpic">
						<div style="position: absolute;background: #000; z-index: 999; width:100%; height:100%; top:0; left:0; text-align: center; display: table;">
						    <span style=" display:table-cell;vertical-align:middle;">
						    	<img src="" alt="" style="width:100%;" class="big-img"/>
						    </span>
						</div>
					</div>
	</body>
</html>
<script type="text/javascript" src="js/jquery-2.2.3.min.js" ></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<script type="text/javascript" src="js/cookie.js" ></script>


<script type="text/javascript" src="js/jssdk.js"></script>

<script type="text/javascript">jssdk('共筑疫情防护墙，同圆生态家园梦。','共筑疫情防护墙，同圆生态家园梦。',window.location.href,'http://forestry.xuanzhen-tech.com/public/img/share.jpg');</script>
<script type="text/javascript">
$('#headimgurl').click(function(){	
	     var uploadImg=$('#headimgurl').attr('src');
	     var bigImg=$('.big-img');
		$(".bigpic").show();
		   bigImg.attr('src',uploadImg);	        
	});
	    $(".bigpic").click(function(){
	           $(".bigpic").hide();    	
		});

$('.photo').click(function(){
	$('#share-wrapper').show();
});
$('#share-wrapper').click(function(){
	$('#share-wrapper').hide();
});
var theRequest = {}
getRequest()
function getRequest() {
    var url = location.search; //获取url中"?"符后的字串
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
            theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
        }
    }
}

if (!getCookie('openid')) {
	window.location.href=window.location.origin+'/welcome/to_oauth/'+theRequest.id;
}
// console.log(theRequest)

$(function(){
	$.post("/welcome/getMember/"+theRequest.id,function(data){
		if (data.code==='0') {
			$('#username').html(data.data.username.substring(0,6))
			$('#province').html(data.data.province)
			$('#hobby').html(data.data.hobby)
			$('#declaration').html(data.data.declaration)
			$('#headimgurl').attr('src','/'+data.data.headimgurl)
		}else if(data.code==='-1'){
			alert(data.message)
		}
	},'json');
})


</script>

<script type="text/javascript">
function vote(){
	// $.post('<?=site_url("welcome/vote_count")?>/'+id,function(data){
	$.post('/welcome/vote_count/'+theRequest.id,function(data){
		
		alert(data.message)
		if (data.code===-5 || data.code===0) {
			window.location.href="/welcome/ranking";
		}
		
	},'json');
}
</script>

